<template>
  <div class="lottery">
    <div class="taberimg_log" v-show="taberimgShow"></div>
    <van-tabs
      v-model="activeName"
      title-active-color="#F84948"
      @click="getwhole"
      :offset-top="offsetTop"
    >
      <van-tab title="全国" name="0">
        <div class="baerry" v-show="bannerShow2">
          <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item
              v-for="(item,index) in imageslist"
              v-if="item.isSensitivel==0 && isShowBU==0 "
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
            <van-swipe-item
              v-if="isShowBU != 0"
              v-for="(item,index) in imageslist"
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
          </van-swipe>
          <!--中奖播报 -->
          <notice-temp :list='noticeList'></notice-temp>
        </div>

        <van-pull-refresh v-model="isLoadinga" @refresh="onRefresha">
          <van-list>
            <div
              class="lottery_list"
              v-for="(item,index) in wholeList"
              :key="index"
              @click="handDeails(index)"
            >
              <!--头部小图片-->
              <template v-if='item.awardExplain == "今日开奖"'>
                <span v-if='item.awardUrl' class="award-today" @click.stop='gobaidu({"url":item.awardUrl})'></span>
                <span v-else class="award-today2"></span>
              </template>
              <template v-if='item.awardExplain == "每日开奖"'>
                <span v-if='item.awardUrl' class="award-everyday" @click.stop='gobaidu({"url":item.awardUrl})'></span>
                <span v-else class="award-everyday2"></span>
              </template>
              <div class="top">
                <div class="left">
                  <span>{{item.clotteryname}}</span>
                  <span>{{item.periodid}}期</span>
                </div>
                <div class="right">
                  <span>{{item.awardtime}}</span>
                  <span>[{{item.awardWeek}}]</span>
                  <span>
                    <img src="./icom-biaoji.png" alt />
                  </span>
                </div>
              </div>
              <div class="content">
                <span
                  :class="item.gameid =='80' || item.gameid=='81' ||item.gameid=='82'||item.gameid=='83'? 'redpading_a':'redpading'"
                  v-for="(it,index) in redList[index]"
                  :key="index"
                >{{it}}</span>

                <span
                  v-if="item.bluecode!==''"
                  class="cla_lan"
                  v-for="(ir,index) in item.bluecode.split(',')"
                >{{ir}}</span>
              </div>
              <div class="button">
                <!-- 双色球 -->
                <div
                  v-if="item.gameid=='01'||item.gameid=='03'|| item.gameid=='07'|| item.gameid=='50'||item.gameid=='51'|| item.gameid=='52'|| item.gameid=='53'"
                  class="button"
                >
                  <div class="barit">
                    <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                  </div>
                  <div class="barit">
                    <span class="span" @click.stop="zst(item.gameid)">走势图</span>
                  </div>
                  <div class="barit">
                    <span class="span" @click.stop="handtochangenum(index)">选号</span>
                  </div>
                </div>

                <div
                  v-else="item.gameid=='80' || item.gameid=='81' ||item.gameid=='82'||item.gameid=='83'"
                  class="button"
                >
                  <div class="barit">
                    <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                  </div>
                  <div class="barit">
                    <span></span>
                  </div>
                  <div class="barit">
                    <span></span>
                  </div>
                </div>
              </div>
              <!--专家命中信息 -->
              <template v-if='item.gameid == "01"'>
                <div class="exper-info" @click.stop='gobaidu({"url":exper101.responseUrl})'>
                  <p>共<span class="red">{{exper101.experCount}}位</span>专家命中<span class="red" v-if='exper101.prizes'>{{Math.ceil(exper101.prizes/10000)}}万</span>,快去看看吧 ></p>
                </div>
              </template>
              <template v-if='item.gameid == "50"'>
                <div class="exper-info" @click.stop='gobaidu({"url":exper201.responseUrl})'>
                  <p>共<span class="red">{{exper201.experCount}}位</span>专家命中<span class="red" v-if='exper201.prizes'>{{Math.ceil(exper201.prizes/10000)}}万</span>,快去看看吧 ></p>
                </div>
              </template>
              <template v-if='item.gameid == "03"'>
                <div class="exper-info" @click.stop='gobaidu({"url":exper102.responseUrl})'>
                  <p>共<span class="red">{{exper102.experCount}}位</span>专家命中<span class="red" v-if='exper102.prizes'>{{Math.ceil(exper102.prizes/10000)}}万</span>,快去看看吧 ></p>
                </div>
              </template>
              <template v-if='item.gameid == "53"'>
                <div class="exper-info" @click.stop='gobaidu({"url":exper202.responseUrl})'>
                  <p>共<span class="red">{{exper202.experCount}}位</span>专家命中<span class="red" v-if='exper202.prizes'>{{Math.ceil(exper202.prizes/10000)}}万</span>,快去看看吧 ></p>
                </div>
              </template>
              <template v-if='item.gameid == "80"'>
                <div class="exper-info" @click.stop='gobaidu({"url":exper401.responseUrl})'>
                  <p>共<span class="red" v-if='exper401.prizeData'>{{exper401.prizeData.winExpertCount}}位</span>专家命中<span class="red" v-if='exper401.prizes'>{{Math.ceil(exper401.prizes/10000)}}万</span>,快去看看吧 ></p>
                </div>
              </template>
            </div>
            <div style="width：100%;height:.5rem;background-color:#f2f2f6"></div>
          </van-list>
        </van-pull-refresh>
      </van-tab>
      <van-tab title="地方彩" name="1">
        <div :class="taberimgShow==true?'toplista':'toplist'">
          <div id="navbass">
            <span id="navspan">
              <img style="width:100%;hieght:100%" src="../../assets/icon/icom-dingweitop.png" alt />
            </span>
            <span style="font-size:.14rem;font-family:PingFangSC-Medium,PingFang SC;font-weight:500; color:rgba(102,102,102,1);"
            >定位您当前所在位置为:</span>
            <span v-show="chaerlistshowa" style="font-size:.14rem;font-family:PingFangSC-Medium,PingFang SC;font-weight:500; color:#66666;"
            >{{regionName}}</span>
            <span v-show="chaerlistshowb" style="font-size:.14rem;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#66666;"
            >{{renamea}}</span>
          </div>
          <van-dropdown-menu>
            <van-dropdown-item ref="itema">
              <div class="nav-more-list">
                <span
                  v-for="(item,index) in listnamea"
                  :key="index"
                  :class="item.regionName == regionName  || index==show1   ? 'nav_activ':'nav_nao'"
                  v-if="item.data.length!==0"
                  @click="clandera(item,index)"
                >{{item.regionName}}</span>
              </div>
            </van-dropdown-item>
          </van-dropdown-menu>
        </div>
        <div v-if="taberimgShow==true" v-show="bannerShow4" style="height:1.4rem"></div>
        <!-- <div v-else style="height:.3rem"></div> -->
        <div class="baerrya" v-show="bannerShow3">
          <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item
              v-for="(item,index) in imageslist"
              v-if="item.isSensitivel==0 && isShowBU==0 "
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
            <van-swipe-item
              v-if="isShowBU != 0"
              v-for="(item,index) in imageslist"
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
          </van-swipe>
          <!--中奖播报 -->
          <notice-temp :list='noticeList'></notice-temp>
        </div>
        <van-pull-refresh v-model="isLoadingb" @refresh="onRefreshb" style="height：100px">
          <van-list v-show="chaerlistshowa">
            <div
              class="lottery_lista"
              v-for="(item,index) in gogenslist"
              :key="index"
              @click="handPricea(index)"
            >
              <div class="top">
                <div class="left">
                  <span>{{item.clotteryname}}</span>
                  <span>{{item.periodid}}期</span>
                </div>
                <div class="right">
                  <span>{{item.awardtime}}</span>
                  <span>[{{item.awardWeek}}]</span>
                  <span class="gooer">
                    <img style="width: 0.06rem; height: 0.12rem;display: inline-block;" src="./icom-biaoji.png" alt />
                  </span>
                </div>
              </div>
              <div class="content">
                <span class="redpading" v-for="(ien,index) in javalist[index]">{{ien}}</span>
                <span class="cla_lan" v-if="item.bluecode!==''">{{item.bluecode}}</span>
              </div>
              <div class="button">
                <div class="barit">
                  <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                </div>
                <div class="barit">
                  <span class="span" @click.stop="zst(item.gameid)">走势图</span>
                </div>
                <div class="barit">
                  <span></span>
                </div>
              </div>
            </div>
            <div style="width：100%;height:.5rem;background-color:#f2f2f6"></div>
          </van-list>

          <van-list v-show="chaerlistshowb">
            <div
              class="lottery_lista"
              v-for="(item,index) in chaerlists"
              :key="index"
              @click="handPriceb(index)"
            >
              <div class="top">
                <div class="left">
                  <span>{{item.clotteryname}}</span>
                  <span>{{item.periodid}}期</span>
                </div>
                <div class="right">
                  <span>{{item.awardtime}}</span>
                  <span>[{{item.awardWeek}}]</span>
                  <span class="gooer">
                    <img style="width: 0.06rem;height: 0.12rem;display: inline-block;" src="./icom-biaoji.png"/>
                  </span>
                </div>
              </div>
              <div class="content">
                <span class="redpading" v-for="(ien,index) in item.awardcode.split(',')">{{ien}}</span>
                <span class="cla_lan" v-if="item.bluecode!==''">{{item.bluecode}}</span>
              </div>
              <div class="button">
                <div class="barit">
                  <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                </div>
                <div class="barit">
                  <span class="span" @click.stop="zst(item.gameid)">走势图</span>
                </div>
                <div class="barit">
                  <span></span>
                </div>
              </div>
            </div>
            <div style="width：100%;height:.5rem;background-color:#f2f2f6"></div>
          </van-list>
        </van-pull-refresh>
      </van-tab>
      <van-tab title="高频彩" name="2">
        <div :class="taberimgShow==true?'toplista':'toplist'">
          <div id="navbass">
            <span id="navspan">
              <img style="width:100%;hieght:100%" src="../../assets/icon/icom-dingweitop.png" alt />
            </span>

            <span
              style="font-size:.14rem;
              font-family:PingFangSC-Medium,PingFang SC;
              font-weight:500;
              color:rgba(102,102,102,1);"
            >定位您当前所在位置为:</span>
            <span v-show="chaerlistshowc" style="font-size:.14rem;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#66666;">{{regionName}}</span>
            <span v-show="chaerlistshowd" style="font-size:.14rem;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#66666;"
            >{{renameb}}</span>
          </div>

          <van-dropdown-menu>
            <van-dropdown-item ref="itemb">
              <div class="nav-more-list">
                <span
                  v-for="(item,index) in listnameb"
                  :key="index"
                  :class="item.regionName==regionName || index == show2 ? 'nav_activ':'nav_nao'"
                  v-if="item.data.length!==0"
                  @click="clanderb(item,index) "
                >{{item.regionName}}</span>
              </div>
            </van-dropdown-item>
          </van-dropdown-menu>
        </div>

        <div v-if="taberimgShow==true" v-show="bannerShow4" style="height:1.4rem"></div>
        <!-- <div v-else style="height:.3rem"></div> -->
        <div class="baerrya" v-show="bannerShow3">
          <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item
              v-for="(item,index) in imageslist"
              v-if="item.isSensitivel==0 && isShowBU==0 "
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
            <van-swipe-item
              v-if="isShowBU != 0"
              v-for="(item,index) in imageslist"
              :key="index"
              @click="gobaidu(item)"
            >
              <img :src="keyUrl+item.image" />
            </van-swipe-item>
          </van-swipe>
          <!--中奖播报 -->
          <notice-temp :list='noticeList'></notice-temp>
        </div>
        <van-pull-refresh v-model="isLoadingc" @refresh="onRefreshc" style="height：100px">
          <van-list v-show="chaerlistshowc">
            <div
              class="lottery_lista"
              v-for="(item,index) in chearlist"
              :key="index"
              @click="handmorea(index)"
            >
              <div class="top">
                <div class="left">
                  <span>{{item.clotteryname}}</span>
                  <span>{{item.periodid}}期</span>
                </div>
                <div class="right">
                  <span>{{item.awardtime}}</span>
                  <span class="gooer">
                    <img style="width: 0.06rem;height: 0.12rem;display: inline-block;" src="./icom-biaoji.png" alt/>
                  </span>
                </div>
              </div>
              <div class="content">
                <span class="redpading" v-for="(itema,index) in baberredlist[index]">{{itema}}</span>
              </div>

              <div class="button">
                <div class="barit">
                  <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                </div>
                <div class="barit">
                  <span class="span" @click.stop="zst(item.gameid)">走势图</span>
                </div>
                <div class="barit">
                  <span></span>
                </div>
              </div>
            </div>
            <div style="width：100%;height:.5rem;background-color:#f2f2f6"></div>
          </van-list>
          <van-list v-show="chaerlistshowd">
            <div
              class="lottery_lista"
              v-for="(item,index) in baerrlist"
              :key="index"
              @click="handmoreb(index)"
            >
              <div class="top">
                <div class="left">
                  <span>{{item.clotteryname}}</span>
                  <span>{{item.periodid}}期</span>
                </div>
                <div class="right">
                  <span>{{item.awardtime}}</span>
                  <span class="gooer">
                    <img style="width: 0.06rem;height: 0.12rem;display: inline-block;" src="./icom-biaoji.png" />
                  </span>
                </div>
              </div>
              <div class="content">
                <span class="redpading" v-for="(ien,index) in item.awardcode.split(',')">{{ien}}</span>
                <span class="cla_lan" v-if="item.bluecode!==''">{{item.bluecode}}</span>
              </div>
              <div class="button">
                <div class="barit">
                  <span class="span" @click.stop="larrypage(item)">历史开奖</span>
                </div>
                <div class="barit">
                  <span class="span" @click.stop="zst(item.gameid)">走势图</span>
                </div>
                <div class="barit">
                  <span></span>
                </div>
              </div>
            </div>
            <div style="width：100%;height:.5rem;background-color:#f2f2f6"></div>
          </van-list>
        </van-pull-refresh>
      </van-tab>
    </van-tabs>

    <!--浮框-->
    <div class="zst-box-flex-box1" v-if='isShowBU == 0?false:true && isShow1'>
      <!-- <span @click='isShow1 = !isShow1;'>x</span> -->
      <a href="http://h.5106cai.com/regit_active/?cf=zs2#/"><img src="../../assets/zst/288.png"></a>
    </div>
  </div>
</template>

<script>
import { getLotteryDraw, getHistoryAwards, getAdvertiSense } from "@/api/whole";
import { getAdvertia } from "@/api/user";
import noticeTemp from './notice';
import { instance2 } from "@/utils/http"
export default {
  name:'lotteryTemp',
  data() {
    return {
      isShow1:true,
      isShowBU:false,
      bannerShow1: false,
      bannerShow2: true,
      bannerShow3: true,
      bannerShow4: false,
      taberimgShow: false,
      offsetTop: "48",
      timestampa: {
        area: "0",
        cfrom: "h5"
      },
      timestampb: {
        area: "1",
        cfrom: "h5"
      },
      timestampc: {
        area: "2",
        cfrom: "h5"
      },
      timestampd: {
        cfrom: "h5"
      },
      timestampe: {
        cfrom: "h5"
      },
      activeName: "0",
      count: 0,
      show1: "999",
      show2: "999",
      showa: false,
      wholeList: [],
      listnamea: [],
      listnameb: [],
      regionName: "",
      renamea: "",
      renameb: "",
      redList: [],
      BlueList: [],
      chearlist: [],
      baberredlist: [],
      elementlist: [],
      charflist: [],
      isLoadinga: true,
      isLoadingb: true,
      isLoadingc: true,
      gogenslist: [],
      godasdlisylist: [],
      keadalista: [],
      javalist: [],
      listnamelist: [],
      ip: "",
      clotterynamelist: [],
      chaerlistshowa: true,
      chaerlistshowb: false,
      chaerlistshowc: true,
      chaerlistshowd: false,
      regionName: "",
      chaerlists: [],
      baerrlist: [],
      headerlist: [],
      graserlist: [],
      godlist: [],
      images: [],
      imageslist: [],
      imageslista: [],
      imageslistb: [],
      imageslistc: [],
      godeslist: [],
      isShowBU: "",
      noticeList:[],
      exper101:{},
      exper102:{},
      exper201:{},
      exper202:{},
      exper401:{},
    };
  },
  components:{
    noticeTemp
  },
  methods: {
    //获取中奖播报 数据
    getLotteryRoll(){
      instance2({
        url: "/static/jcob/js/kjgg_lotteryRoll.js",
      }).then(v=>{
        let data = v.data;
        this.noticeList = data.lotteryRoll;
      })
    },
    //获取专家命中信息
    getExperInfo(){
      instance2({
        url: "/static/jcob/js/kjgg_experHitInfo.js",
      }).then(v=>{
        let experHitInfo = v.data;
        this.exper101 = experHitInfo['101']
        this.exper201 = experHitInfo['201']
        this.exper102 = experHitInfo['102']
        this.exper202 = experHitInfo['202']
        this.exper401 = experHitInfo['401']
      })
    },
    //选号方法
    handtochangenum(index) {
      this.$store.state.ballName = this.wholeList[index].periodid;
      this.$store.state.ballTime = this.wholeList[index].awardtime;
      this.$router.push("/selection/" + this.wholeList[index].gameid);
    },
    zst(id) {
      this.$router.push({
        path: `/zst/${id}/1`
      });
    },
    //地方
    handPricea(index) {
      this.$store.state.whreeCity = this.gogenslist[index].iarea; //判断详情页点击的是地方还是高频
      this.$router.push({
        path: "/details",
        query: {
          pid: this.gogenslist[index].periodid,
          gid: this.gogenslist[index].gameid,
          iarea: this.gogenslist[index].iarea
        }
      });
    },

    handPriceb(index) {
      this.$store.state.whreeCity = this.chaerlists[index].iarea;
      this.$router.push({
        path: "/details",
        query: {
          pid: this.chaerlists[index].periodid,
          gid: this.chaerlists[index].gameid,
          iarea: this.chaerlists[index].iarea
        }
      });
    },

    //高频
    handmorea(index) {
      this.$store.state.whreeCity = this.chearlist[index].iarea;
      this.$router.push({
        path: "/details",
        query: {
          pid: this.chearlist[index].periodid,
          gid: this.chearlist[index].gameid,
          iarea: this.chearlist[index].iarea
        }
      });
    },

    handmoreb(index) {
      this.$store.state.whreeCity = this.baerrlist[index].iarea;
      this.$router.push({
        path: "/details",
        query: {
          pid: this.baerrlist[index].periodid,
          gid: this.baerrlist[index].gameid,
          iarea: this.baerrlist[index].iarea
        }
      });
    },

    // 全国
    handDeails(index) {
      this.$router.push({
        path: "/details",
        query: {
          pid: this.wholeList[index].periodid,
          gid: this.wholeList[index].gameid
        }
      });
    },
    larrypage(e) {
      this.$router.push({
        name:'history',
        query:{
          gid:e.gameid,
          iarea:e.iarea,
        }
      });
    },

    clandera(a, b) {
      this.regionName = "";
      if (this.gogenslist.length !== "") {
        this.chaerlistshowa = false;
        this.$refs.itema.toggle();
        this.chaerlists = a.data;
        this.renamea = a.regionName;
        this.show1 = b;
        this.chaerlistshowb = true;
      }
    },
    clanderb(c, d) {
      this.regionName = "";
      if (this.chearlist.length !== "") {
        this.chaerlistshowc = false;
        this.$refs.itemb.toggle();
        this.baerrlist = c.data;
        this.renameb = c.regionName;
        this.show2 = d;
        this.chaerlistshowd = true;
      }
    },
    getwhole(name, title) {
      sessionStorage.setItem('activeName',name)
      if (name == "0") {
        getLotteryDraw(this.timestampa).then(res => {
          const arr = res.data.moduleBOList;
          let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
          let newArr = [];
          for (let i = 0; i < ids.length; i++) {
            for (let j = 0; j < arr.length; j++) {
              if (ids[i] == arr[j].top) {
                newArr.push(arr[j]);
              }
            }
          }
          this.wholeList = newArr;
          let gonggao = [];
          this.wholeList.forEach(element => {
            let condhah = element.awardcode;
            if (element.awardcode.includes("|")) {
              this.redList.push(condhah.split("|")[0].split(","));
              this.BlueList.push(condhah.split("|")[1].split(","));
            } else {
              this.redList.push(condhah.split(","));
            }
          });
          this.isLoadinga = false;
        });
      } else if (name == "1") {
        getLotteryDraw(this.timestampb).then(res => {
          if (res.data.locate == "") {
            const list = res.data.moduleBOList.regions;
            this.listnamea = list;
            this.gogenslist = res.data.moduleBOList.regions[0].data;
            this.regionName = res.data.moduleBOList.regions[0].regionName;
            this.gogenslist.forEach(element => {
              let goddes = element.awardcode;
              this.javalist.push(goddes.split(","));
            });
          } else {
            this.gogenslist = res.data.locate.data;
            this.gogenslist.forEach(element => {
              let goddes = element.awardcode;
              this.javalist.push(goddes.split(","));
            });
            if (this.show1 === "999") {
              this.regionName = res.data.locate.regionName;
            } else {
              this.regionName = "";
            }

            this.chaerlistshowb = true;
            const list = res.data.moduleBOList.regions;
            this.listnamea = list;
          }
          this.isLoadingb = false;
        });
      } else {
        getLotteryDraw(this.timestampc).then(res => {
          if (res.data.locate == "") {
            const list = res.data.moduleBOList.regions;
            this.listnameb = list;
            this.chearlist = res.data.moduleBOList.regions[0].data;
            this.regionName = res.data.moduleBOList.regions[0].regionName;
            this.chearlist.forEach(element => {
              let mosd = element.awardcode;
              this.baberredlist.push(mosd.split(","));
            });
          } else {
            this.chearlist = res.data.locate.data;
            this.chearlist.forEach(element => {
              let mosd = element.awardcode;
              this.baberredlist.push(mosd.split(","));
            });
            if (this.show2 === "999") {
              this.regionName = res.data.locate.regionName;
            } else {
              this.regionName = "";
            }

            this.chaerlistshowb = true;
            const list = res.data.moduleBOList.regions;
            this.listnameb = list;
          }
          this.isLoadingc = false;
        });
      }
    },
    gobaidu(item) {
      if (item.url) {
        window.location.href = item.url;
      }
      
    },
    //地址弹窗
    showPopup() {
      this.show = true;
    },
    showPopups() {
      this.showa = true;
    },
    // 查地区
    getAdverti() {
      getAdvertiSense({
        cfrom: "h5",
        position:'hpage'
      }).then(res => {
        // console.log(res.data.isShow);
        this.isShowBU = res.data.isShow;
        // alert(this.isShowBU);
        // console.log(this.isShowBU);

        this.offsetTop = "0";
      });
    },
    //广告
    getAdvertiab() {
      getAdvertia().then(res => {
        const arr = res.data.data.data;
         let ids = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
          let newArr = [];
          for (let i = 0; i < ids.length; i++) {
            for (let j = 0; j < arr.length; j++) {
              if (ids[i] == arr[j].order) {
                newArr.push(arr[j]);
              }
            }
          }
        this.imageslist = newArr;
      });
    },

    // 下拉刷新
    onRefresha() {
      setTimeout(() => {
        this.getwhole(0);
        this.$toast("刷新成功");
      }, 1000);
    },
    onRefreshb() {
      setTimeout(() => {
        this.getwhole(1);
        this.$toast("刷新成功");
      }, 1000);
    },
    onRefreshc() {
      setTimeout(() => {
        this.getwhole(2);
        this.$toast("刷新成功");
      }, 1000);
    }
  },
  created() {
    let activeNames = sessionStorage.getItem('activeName') || 0;
    this.activeName = activeNames;
    this.getwhole(activeNames);
    (this.chaerlistshowc = true), (this.chaerlistshowa = true);
    this.getAdverti();
    this.getAdvertiab();
    //专家信息
    this.getLotteryRoll();
    this.getExperInfo();
    
  },
  mounted(){},
  updated() {
    document.scrollingElement.scrollTop = 0
  },

};
</script>

<style lang="less" scoped>
 @import './style.less';
 .zst-box-flex-box1{
    position: fixed;
    width: 75px;
    height: 81px;
    bottom: 30%;
    // top: 70px;
    right:15px;
    z-index: 9999;
    span{
      position:absolute;
      width: 20px;
      height: 20px;
      line-height: 20px;
      font-size: 18px;
      text-align: center;
      color: #000;
      top: -30px;
      right: -10px;
      background:rgba(255,255,255);
      border-radius: 50%;
    }
    img{
      width: 100%;
      height: auto;
    }
  }
</style>
